Skip to content

Fix two lines changed by mistake in the 4.22 merge - #14767

Open
bhouse-nexthop wants to merge 1 commit into
apache:mainfrom
bhouse-nexthop:fix-merge-82bfa9fb3f-leftovers
Open

bhouse-nexthop wants to merge 1 commit into
apache:mainfrom
bhouse-nexthop:fix-merge-82bfa9fb3f-leftovers

Conversation

@bhouse-nexthop

Copy link
Copy Markdown
Collaborator

Description

Fixes two lines on main that the 4.22 merge 82bfa9f changed by mistake.

file change why
ApiResponseHelper Boolean.getBoolean(value) -> Boolean.parseBoolean(value) getBoolean reads a system property, so snapshots on storage with storage-system snapshot support were reported with the Image role
VolumeApiServiceImpl UseHttpsToUpload.value() -> UseHttpsToUpload.valueIn(zoneId) restores #11539 for volume uploads; the zone value was ignored
VolumeApiServiceImpl {code}...{code} -> {@code ...} in a Javadoc broken tag from the same merge

Related: #14760 (duplicated block from the same merge).

Fixes: #14766

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

How Has This Been Tested?

  • New ApiResponseHelperTest cases for getDataStoreRole (capability true -> Primary, false -> Image). The true case fails before the fix.
  • ApiResponseHelperTest and VolumeApiServiceImplTest pass.
  • No unit test for the uploadVolume line: the method needs the DB transaction, call context and a private validation step. It is the same call TemplateManagerImpl already makes.

The merge 82bfa9f left these on main; neither parent had them.

- ApiResponseHelper.getDataStoreRole: Boolean.getBoolean(value) reads
  a JVM system property, so it was always false and snapshots on
  storage with storage-system snapshot support got the Image role.
  Use Boolean.parseBoolean(value), same as main had (new Boolean).
- VolumeApiServiceImpl.uploadVolume: restore
  UseHttpsToUpload.valueIn(zoneId) from apache#11539; the zone value was
  ignored for volume uploads.
- VolumeApiServiceImpl: fix {code}...{code} Javadoc to {@code ...}.
- Add getDataStoreRole tests in ApiResponseHelperTest.

Signed-off-by: Brad House <bhouse@nexthop.ai>
@codecov

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 20.81%. Comparing base (2737087) to head (2d9e488).

Files with missing lines Patch % Lines
...n/java/com/cloud/storage/VolumeApiServiceImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##               main   #14767     +/-   ##
===========================================
  Coverage     20.80%   20.81%             
- Complexity    20919    20923      +4     
===========================================
  Files          6053     6053             
  Lines        548451   548451             
  Branches      78719    73279   -5440     
===========================================
+ Hits         114128   114138     +10     
+ Misses       420958   420944     -14     
- Partials      13365    13369      +4     
Flag Coverage Δ
uitests 3.86% <ø> (ø)
unittests 22.24% <50.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merge of 4.22 into main left Boolean.getBoolean and a non-zone use.https.to.upload lookup

1 participant